<?php 
class PostModel extends Model{
	var $tableName = 'bbs_post';
	
	
	function getPostInfo( $tid ){
		$info =  $this->query("SELECT a.id,a.uid,a.tid,a.istopic,a.cTime,a.title as posttitle,a.content,b.board,b.tags as ttags,b.title,b.tclass,b.uid as tuid,a.attach FROM ".C('DB_PREFIX')."bbs_post a LEFT JOIN ".C('DB_PREFIX')."bbs_topic b on a.tid=b.id WHERE a.id=$tid");
		return $info[0];
	}
}
?>